//
//  CTRequestErrorCode.m
//  ConstellationTalk_0.1
//
//  Created by riley on 15/5/11.
//  Copyright (c) 2015年 riley chu. All rights reserved.
//

#import "CTRequestErrorCode.h"
#import "CTDebugManager.h"
#import "CTAppLanguage.h"

@implementation CTRequestErrorCode

+(NSString *)errDescription:(NSString *)errCode
{
    NSString * descriptionStr;
    NSString * remindStrKey = @"errDefault";
    
    @try {
        int code = [errCode intValue];
        
        switch (code) {
            case 90001:
                remindStrKey = @"err90001";
                break;
            case 90002:
                remindStrKey = @"err90002";
                break;
            case 90003:
                remindStrKey = @"err90003";
                break;
            case 90004:
                remindStrKey = @"err90004";
                break;
            case 90005:
                remindStrKey = @"err90005";
                break;
            case 90006:
                remindStrKey = @"err90006";
                break;
            case 10001:
                remindStrKey = @"err10001";
                break;
            case 10002:
                remindStrKey = @"err10002";
                break;
            case 20001:
                remindStrKey = @"err20001";
                break;
            case 20002:
                remindStrKey = @"err20002";
                break;
            case 20003:
                remindStrKey = @"err20003";
                break;
            case 20004:
                remindStrKey = @"err20004";
                break;
            case 20005:
                remindStrKey = @"err20005";
                break;
            case 20006:
                remindStrKey = @"err20006";
                break;
            case 20007:
                remindStrKey = @"err20007";
                break;
            case 20008:
                remindStrKey = @"err20008";
                break;
            case 20009:
                remindStrKey = @"err20009";
                break;
            case 30001:
                remindStrKey = @"err30001";
                break;
            case 30002:
                remindStrKey = @"err30002";
                break;
            case 30003:
                remindStrKey = @"err30003";
                break;
            case 30004:
                remindStrKey = @"err30004";
                break;
            case 30005:
                remindStrKey = @"err30005";
                break;
            case 30006:
                remindStrKey = @"err30006";
                break;
            case 40001:
                remindStrKey = @"err40001";
                break;
            case 40002:
                remindStrKey = @"err40002";
                break;
            case 40003:
                remindStrKey = @"err40003";
                break;
            case 40004:
                remindStrKey = @"err40004";
                break;
            case 40005:
                remindStrKey = @"err40005";
                break;
            case 40006:
                remindStrKey = @"err40006";
                break;
            case 40007:
                remindStrKey = @"err40007";
                break;
            case 40008:
                remindStrKey = @"err40008";
                break;
            case 40009:
                remindStrKey = @"err40009";
                break;
            case 400010:
                remindStrKey = @"err400010";
                break;
            case 400011:
                remindStrKey = @"err400011";
                break;
            case 60004:
                remindStrKey = @"err60004";
                break;
                
            default:
                break;
        }
        
        descriptionStr = [CTAppLanguage localizedStringForKey:remindStrKey withValue:nil withTable:@"Language"];
    }
    @catch (NSException *exception) {
        [CTDebugManager showErrorLogInfo:@"错误码翻译描述失败!!"];
    }
    
    return descriptionStr;
}

@end
